<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 2. 编写parent构造函数; 并创建一个自我介绍功能;
        function Person(name,age){
            this.name = name;
            this.age = age
        }
        Person.prototype.showMe = function(){
            console.log(`我是${this.name},今年${this.age}岁`)
        }
        let p1 = new Person("二狗",18)
        let p2 = new Person("钢弹",28)
        p1.showMe()
        p2.showMe()
    </script>
</body>
</html>